home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d19
/
dorpch37.arc
/
DOORPCH.DOC
< prev
next >
Wrap
Text File
|
1991-01-01
|
100KB
|
2,729 lines
D O O R P C H
=====================
Release 3.7
January 1, 1991
Raymond Clements
Copyright (C)1987-1991
2204 Carriage Dr.
Owensboro, KY 42301-5823
The Pegasus BBS
Node 1 - (502)684-9855
Node 2 - (502)684-9871 HST
Table Of Contents
=====================
Overview . . . . . . . . . . . . . . . . . . . . 1
Disclaimer of Liability . . . . . . . . . . . . . 1
Contents of "ZIP" File . . . . . . . . . . . . . 2
Features of This Release . . . . . . . . . . . . 3
Operating Environment . . . . . . . . . . . . . . 5
Planned Future Enhancements . . . . . . . . . . . 5
DOORPCH Configuration File . . . . . . . . . . . . 5
DOORs Configuration File . . . . . . . . . . . . . 6
DoorPch Routines . . . . . . . . . . . . . . . . . 6
DoorPch Variables . . . . . . . . . . . . . . . . 11
DoorPch Macros . . . . . . . . . . . . . . . . . . 24
Structure of a DOOR Program . . . . . . . . . . . 25
Include File Usage . . . . . . . . . . . . . . . 26
Opening and Closing of Files . . . . . . . . . . 26
Starting a DOOR . . . . . . . . . . . . . . . . 27
Terminating a DOOR . . . . . . . . . . . . . . . 27
Compiling Your DOOR Program . . . . . . . . . . 27
Linking Your DOOR Program . . . . . . . . . . . 28
Executing Your DOOR Program . . . . . . . . . . 28
Programming Tips . . . . . . . . . . . . . . . . . 28
ANSI Color Graphics . . . . . . . . . . . . . . 28
Intensity of Text . . . . . . . . . . . . . . 29
Blinking Text . . . . . . . . . . . . . . . . 29
Foreground/Background Colors . . . . . . . . . 29
Printing Output . . . . . . . . . . . . . . . . 29
Printing a Complete Line . . . . . . . . . . . 29
Printing a Partial Line . . . . . . . . . . . 30
Printing a Line & Get a Response . . . . . . . 30
Printing With TABs . . . . . . . . . . . . . . 30
Ringing the Bell . . . . . . . . . . . . . . . . 30
Adding Color the EASY Way . . . . . . . . . . . 31
Sending ANSI Music . . . . . . . . . . . . . . . 31
Bell, Alarm or Local Music Toggles . . . . . . . 32
Clearing the Screen . . . . . . . . . . . . . . 32
BASIC Keywords . . . . . . . . . . . . . . . . . 32
High Scores & Bulletins . . . . . . . . . . . . 32
SysOp Information . . . . . . . . . . . . . . . . 33
Lines 24 & 25 of the Display . . . . . . . . . . 33
Extended Key Meanings . . . . . . . . . . . . . 34
DoorPch History . . . . . . . . . . . . . . . . . 35
DoorPch Credits . . . . . . . . . . . . . . . . . 35
Reporting Problems . . . . . . . . . . . . . . . . 36
User Enhancement Requests . . . . . . . . . . . . 37
DoorPch Registration . . . . . . . . . . . . . . . 37
Trademarks / Copyrights . . . . . . . . . . . . . 38
DoorPch - Version 3.7
User's Guide for DOOR Programs
Overview
========
DoorPch is a set of Basic and Assembler language routines which
facilitate the creation of a multi-BBS DOOR program. All the
logic to monitor the carrier, input and output for the
communications port is included in the code. Full ANSI color
graphics and ANSI music capabilities are also included. All you
must do is follow some simple interface requirements and then
either do a GOSUB or CALL to perform the required function. The
code also maintains an informative display on lines 24 and 25 of
the local console, closely, and in some cases, exactly, like
PCBoard. The options to turn the display, bell and alarm on & off
are also at your disposal. Now, after reading this you probably
are saying "Huh ?" or "Sure!". Really! Its very simple....
DoorPch is used by more DOORs than any other software of its
kind. So join the fun of writing DOORs. You, and countless
others, will benefit from your efforts. There are imitations,
look-a-likes and competition from other less functional software,
but there is only one DoorPch!
Disclaimer of Liability
=======================
We assume no liability for its use. You may copy it and share it
with others so long as the code and the documentation are
distributed together. You may include this logic in as many DOOR
programs as you wish. If you have any suggestions for
improvements to this code, reply to the address below or call our
BBSs at the number stated above. Please complete the
Registration form at the end of this documentation. This program
and all its INCLUDE and Library files are copyrighted. It is
unlawful to disassemble or otherwise decode or misuse the
software contained herein. It is for your use in creating DOORs
and may not be altered in an way. You may not charge a fee for
its use or sell it. DORPCH37.ZIP is to be distributed in its
ORIGINAL ZIP format and contain ALL the original files.
Send inquires to: Raymond Clements
DoorPch Info
2204 Carriage Dr.
Owensboro, KY 42301-5823
Page 1
DoorPch - Version 3.7
User's Guide for DOOR Programs
Contents Of "ZIP" File
======================
The following files should be in DORPCH37.ZIP:
1. BRUN30.EXE Microsoft QuickBASIC 3.0 run-time library. It
has been patched to hold DTR. See QBDTRPCH.
2. CLE.BAT Batch file for compiling & Linking sample
DOOR program EXAMPLE.BAS.
3. COMPILE.BAT Batch file to COMPILE your source module with
library DORPCH37.EXE.
4. DOORPCH.BEG INCLUDE this code AFTER the INCLUDE
of DOORPCH.USR.
Note: Some variables must be set prior to
this INCLUDE. See README.NOW and DOCS.
5. DOORPCH.DOC This documentation. For use in developing
multi-BBS DOORs.
6. DOORPCH.CFG Configuration file for DoorPch which will be
used by all it's DOOR programs.
7. DOORPCH.END INCLUDE this code at the END of your program.
If you are upgrading an earlier DOOR you may
still use this code. It replaced the old
GETIN2.ASC.
8. DOORPCH.USR COMMON variables. INCLUDE this code at the
BEGINNING of your program.
9. DOORNAME.CF1 An example configuration file for single node
operation.
10. DOORNAME.CF2 An example configuration file for Node 2 if
required.
11. DORPCH37.EXE You MUST compile your DOOR using the /L
DORPCH37.EXE parameter. The logic in this
library replaced most of the old GETIN2.
12. DP37UTIL.EXE The utility used to setup each DOOR's .SCR
and/or .LDR files. It can also be used to
purge names from those files. For a list of
commands use: DP37Util /HELP.
13. EXAMPLE.BAS A nice example DOOR (source code).
14. EXAMPLE.EXE The compiled ready-to-run EXAMPLE Door.
15. EXAMPLE.TXT NON-GRAPHICS file for EXAMPLE.EXE
Page 2
DoorPch - Version 3.7
User's Guide for DOOR Programs
16. EXAMPLEG.TXT GRAPHICS file for EXAMPLE.EXE
17. EXDOOR.BAT A typical DOOR batch file.
18. LINKER.BAT Batch file to LINK your .OBJ into an .EXE.
19. QBDTRPCH.ZIP Info for DEBUG patch for DTR control in
QuickBASIC.
20. README.NOW If included, should be READ right away!
21. SYSOP.DOC You are to include this documentation within
the ZIP file containing your DOOR program.
The SysOp will need this information to
understand how to interface with doors
utilizing DOORPCH.
22. CHANGES.DOC This file contains a list of changes/fixes
made to DoorPch since Version 3.1 was
released. This file should be carefully
reviewed before using any new release of
DoorPch.
Features of This Release
========================
Does NOT require the use of CTTY!!
Constant monitoring of COM port. Returns to BBS if carrier lost.
Supports Monochrome and Color BBS systems.
Supports all the standard COLORs in ANSI.SYS including High
Intensity and Blinking text.
Supports the use of ANSI Music.
Informative line 24/25 display similar to PCBoard.
Supports the following BBS interface files:
DOOR.SYS, PCBOARD.SYS/PCBOARD.DAT/USERS, SFDOORS.DAT,
CALLINFO.BBS, DORINFO#.DEF, and CHAIN.TXT
Compatible with Networks using SHARE. A node blocker routine,
limits DOOR programs that don't/can't run on two nodes to run on
one node at a time.
Easy to interface with. Minimal information required from your
DOOR program.
DOOR can run in LOCAL mode as well as use the COM port.
Page 3
DoorPch - Version 3.7
User's Guide for DOOR Programs
Screen positioning (Col & Row) allow DOORS to update the screen
of the caller rather than scrolling text (ANSI codes). This is
very useful for DOORs which display a "board" on the screen.
Allows SysOp to CHAT with caller in DOOR (F10). Supports word
wrapping at end of line similarly to BBS. All CHAT time credited
so caller does not lose any time.
SysOp can exit to DOS from inside the DOOR and return (F5).
Includes a "standard" high score routine for tracking and
maintaining a bulletin for each DOOR game.
Provides the ability to "read" GRAPHICS and NON-GRAPHICS files
from disk to display to a caller. These files may be a menu for
your door, perhaps a logon or logoff screen, etc. It's very easy!
Allows the use of ALT-N (SysOp NEXT ON).
Allows the use of ALT-X (Exit to DOS after caller).
Provides Music Toggle (F3).
Provides Alarm Toggle (F4).
Provides Graphics Toggle (F6).
Provides Bell Toggle (F7).
Allows SysOp to force the caller to return to BBS (F8).
Ability to turn display on and off (F9).
Ability to increase or decrease a caller's time with the Up and
Down Arrow KEYS.
Supports up to 115,200 BPS modems including Hayes V Series.
Also support CTS checking (MNP flow control).
Reduces caller's time if an Event is scheduled.
Monitors soft errors and reports the errors to the SysOp.
Results are written to the local console and to a disk file:
DOORPCH.ERR (This will be in the same directory as DORPCH37.EXE.)
Error free! Well, maybe not, but we strive to attain "zero-
defects".
Cost is minimal compared to the benefits.
Last, but not least, Compatible with PCBoard v14.x, GAP v4.x,
RBBS-PC v17.x, WILDCAT! v2.x, Spitfire v3.x.
Page 4
DoorPch - Version 3.7
User's Guide for DOOR Programs
Operating Environment
=====================
DoorPch supports COM1 and COM2 only!!
The use of CTTY is NOT necessary when this code is used.
The memory addresses used by this code are those used by the IBM
PC and "true" compatibles such as AT&T. This code was developed
for Microsoft QuickBASIC 3.0. It may NOT be used with other
versions of QuickBASIC. QuickBASIC 4.0 was NOT used to create a
LIB file due to problems detected in its use on 80286 CPU's
running multi-tasking software (DoubleDOS & Taskview).
Be sure to either include a (patched for DTR) version of
BRUN30.EXE in your DOOR ZIP file or provide a way for other
SysOps to get a version from you.
The DORPCH37.EXE logic will detect a NOCARRIER condition and
branch back to the BBS eliminating the need for WATCHDOG. This
exact code is currently used in several DOOR programs on my BBS.
Planned Future Enhancements
===========================
Provide "full" support for both Quick Basic Version 3.0 & 4.x.
We continue to use QuickBASIC 3.0 simply because we had found
many problems using the QuickBASIC 4.x compilers. The problems
did not materialize until we operated TWO DOORS compiled with
DoorPch (using QuickBASIC 4.0) in both partitions under DoubleDOS
3.1V and 4.0. A single DOOR would operate fine. However TWO
doors caused the system to "hang".
We will look into all the ramifications of these compilers. If a
solution can be found, we will provide a QuickBASIC 4.x LIB file
which will allow you to static LINK with the libraries rather
than the current dynamic link provided by the QuickBASIC 3.0
environment.
DOORPCH Configuration File
==========================
File Name: DOORPCH.CFG
The data in this file lets you setup DoorPch for your BBS. Place
this file in the same sub-directory as the DORPCH37.EXE file.
Line #1=> PCBoard (The type of BBS software used)
Line #2=> The Pegasus BBS (The BBS' name)
Line #3=> Raymond (The first name of the SysOp)
Page 5
DoorPch - Version 3.7
User's Guide for DOOR Programs
Line #4=> Clements (The last name of the SysOp)
Line #5=> Y (Y or N) Do you have DOS' Share.exe
loaded?
Line #6=> Y (Y or N) Do you want to use PCBoard's
"@" macros?
Line #7=> Y (Y or N) Do you want to hear music
when caller alarm is on?
DOORs Configuration File
========================
File Name: DOORNAME.CFn, where n is 1 or 2.
The data in this file tells DoorPch where the BBS file is located.
Place this file in the same sub-directory (default) as the
executable DOOR program. The data in each record MUST begin
in column 1. This file is OPEN'ed as file #1. It is left OPEN
for your convenience.
You may add additional records beginning at record # 6 if you
wish to pass additional information that your program may need to
run. If you do not need anything additional in this file, you
should CLOSE #1 following the $INCLUDE DOORPCH.BEG statement:
Line #1=> C:\PCB\PCBOARD.SYS (The location for the BBS I/O file)
Line #2=> The Pegasus BBS (The BBS' name)
Line #3=> Raymond (The first name of the SysOp)
Line #4=> Clements (The last name of the SysOp)
If the DOOR uses DoorPch's Door Security System then:
Line #5=> Sondra Clements (The donor of the DOOR
or left blank if not used)
DoorPch Routines
================
The following list outlines the various routines that are
available in DoorPch v3.7 for your usage:
Subroutine Name Subroutine Usage
------------------------ -----------------------------------
10000 (label) The Error routine. You should
or insure that if you change the ON
ERR.ROUTINE (label) ERROR GOTO xxx statement that it is
restored to 10000.
Page 6
DoorPch - Version 3.7
User's Guide for DOOR Programs
| ALIAS A CALL to this SUB will get the
caller's alias if they already have
one or ask them for one if they
don't already have one.
CAPS A CALL to this subroutine will
cause anything in ARG$ to be put in
first letter caps. IE: DOORPCH
would change to DoorPch.
CENT(anystring$) Leading spaces are appended to
anystring$ so as to center the
string for output.
COLOR.CHK A CALL to this routine will cause
LN$ to be outputted in a color
format. The format is anything
contained between the (,<,[
and ],>,) char will be a different
foreground color. Either red for
numbers, cyan for uppercase text or
green for lowercase text.
CLR.SCRN Do NOT do a CLS or send CHR$(12) to
the COM port. Rather do a CALL
CLR.SCRN. The Lines 24 and 25 will
then be refreshed on the screen.
CVTTIME This routine will call GETTIME &
FORMATTIME to perform the
conversion.
| DELAY.TIME(D.TIME#) Call this routine and pass an
integer in order to generate a
delay expressed in seconds.
(ie. D.TIME# = 1 means 1 second and
D.TIME# = 10.5 means 10.5 seconds)
| DELAY.TIME.BAUD(D.TIME#) Call this routine and pass an
integer in order to generate a
delay expressed in seconds. This
delay should be used to help with
synchronization between the local
BBS screen and the remote caller's
screen.
ENTER A call to this routine will
generate a "Press <ENTER> to
continue.." and wait for a CR.
EXITG Call this routine when you are
ready to terminate your DOOR
program.
Page 7
DoorPch - Version 3.7
User's Guide for DOOR Programs
FORMATTIME Using HOURS% and MINUTES% this SUB
will format string DISPTIME$ with
the format HH:MM.
GET.DAY(TDATE$,DAY%) A call here will convert any date
put in TDATE$ to the day it is from
the beginning of the year and
returned in DAY%. TDATE$ format:
DD/MM/YYYY.
GET.INKEY This SUB closely emulates BASIC's
INKEY$ command. It looks for a key
on the COM port or local keyboard.
It stores the last key entered in
USR.KY$. It does NOT print to any
device nor does it update ARG$. The
DOOR author must keep track of
"keyboard timeouts" and printing
the output, if necessary.
GET.KEY CALL to this subroutine when you
wish a character input WITHOUT the
caller pressing RETURN! Character
is NOT echoed.
GET.KEYECHO Performs the same function as
GET.KEY but echoes the character
to the caller and the local screen.
GET.KEYLOOP This SUB "looks" for input. If a
key was entered it will be placed
in USR.KY$ and echoed to the
caller. If NO key was entered then
USR.KY$ will be empty. The key
entered will be concatenated to the
end of ARG$. ARG$ should be
cleared prior to CALLing this SUB.
This routine allows you to check
for input and continue processing.
You must keep track of the callers
"keyboard time" to be sure they
have not fallen asleep!
| GET.PLAYER2 CALL this SUB to get the second
player's score from the high score
file without showing them the score
file.
| GET.SCORE CALL this SUB to get the caller's
score from the high score file
without showing them the score file.
GETTIME Call this SUB to obtain the
following variables:
HOURS% - the current hour
MINUTES% - the current minute
SECONDS% - the current second
SINCEMID# - seconds since midnight
| HANGUP Drops carrier on the caller.
HIGH.SCORE This is a standardized HIGH SCORE
routine. The following variables
are important in here:
HSCR#, FIRST$, LAST$, ALIAS.FIRST$,
ALIAS.LAST$, EXTRA%, EXTRA1.NAME$,
EXTRA1$, EXTRA2.NAME$, EXTRA2$,
EXTRA3.NAME$, EXTRA3$, SORT%,
ONCE%, DOORPCH.SCORES%, RUNG%,
POINTS.NAME$, SCORES.NAME$, PROGB$,
LAST.DATE.PLAYED$
Page 8
DoorPch - Version 3.7
User's Guide for DOOR Programs
INITIALIZE The DOORPCH.BEG logic will CALL
this subroutine to initialize
DORPCH37.EXE (and your DOOR).
IN.PUT CALL to this SUB to output the
contents of LN$. This SUB then
waits for the caller to respond
with input which is returned in
in ARG$. This SUB is used to ask
a caller for a response.
| JULIAN.TO.MONTH.DAY.YEAR This SUB converts the julian date
into the proper month, day and year.
LCONV(string) Will convert "string" to all
lowercase characters.
LEFTTRUN(string) Will truncate all leading spaces
from "string".
| MONTH.DAY.YEAR.TO.AGE This SUB converts the month, day
and year into the age.
| MONTH.DAY.YEAR.TO.JULIAN This SUB converts the month, day
and year into the julian date.
MORE A CALL to MORE will output a prompt
and waits for a CR. Check for a
"E" in ARG$. If found then cause
your output to stop.
MUSICG CALL to this subroutine to output
the contents of MUSIC$. MUSIC$ MUST
be filled with valid notes, pauses,
timing, and octave commands.
NAMEG Any true name put in ARG$ will be
converted to proper case.
OUT.NCR CALL to this subroutine to output
the contents of LN$. The CURSOR
will remain at the end of the line.
A CR & LF will NOT be sent.
OUT.PUT CALL to this subroutine to output
the contents of LN$.
| OUT.PUTS(anynumber%) CALL to this SUB to send multiple
CRLFs.
Page 9
DoorPch - Version 3.7
User's Guide for DOOR Programs
| PRINT.USING CALL this SUB to put the contents
of LN$ into the format of
PRINT.USING$ by specifing SYMBOL$
equals either "$", "!", "%", or "#".
This SUB is used like BASIC's
Print Using routine.
| PUT.PLAYER2 CALL this SUB to put the second
player's score back into the high
score file without showing them the
score file. (This SUB should not
be used after a CALL HIGH.SCORE.)
| PUT.SCORE CALL this SUB to put the caller's
score back into the high score file
without showing them the score file.
(This SUB should not be used after
a CALL HIGH.SCORE.)
| READ.TXT(color$,mono$) CALL this SUB with the names of the
files to be displayed to the caller.
This SUB will first look for the
ANSI color filename (ie. COLOR$) if
the caller is in graphics mode
unless DoorPch has been configured
to support PCBoard's "@X" color
macros. If the ANSI color filename
does NOT exist then the mono
filename (ie. MONO$). This feature
is very nice for displaying menus,
opening and closing screens to
the callers. The drive & path may
also be included with the file
name.
RIGHTTRUN(string) Will truncate all trailing spaces
from "string".
| SHOW.SCORE CALL this SUB to show the high
score file.
Page 10
DoorPch - Version 3.7
User's Guide for DOOR Programs
| STACKED.IN.PUT CALL to this SUB to output the
contents of LN$. This SUB then
waits for the caller to respond
with input which is returned in
in ARG$. This SUB is used to ask
a caller for multiple responses.
The caller may stack multiple
commands by separating them with a
space or semi-colon. Repeated
calls to this SUB retrieve commands
from the stack, one at a time, and
prints it to the screen simulating
the player actually entering in the
commands one at a time and returns
it in the ARG$.
| SWAP.PLAYERS CALL this SUB to swap the caller's
and the second player's info in the
score file.
TRUN(any string) CALL this routine to cause a
truncations of ALL leading spaces
as well as all trailing spaces in
the passed parameter string.
UCONV(string) Will convert "string" to all
uppercase characters.
All non documented calls are at your own risk, and may change at
anytime.
DoorPch Variables
=================
The following variables are used to pass information between your
DOOR program and DoorPch:
Variable Definition
----------------------- ----------------------------------
ALIAS.FIRST$ If the caller is using an alias
this will be the caller's FIRST
name.
ALIAS.LAST$ Same as above except LAST name.
| ALIAS.NAME$ Same as above except FIRST and LAST
name.
Page 11
DoorPch - Version 3.7
User's Guide for DOOR Programs
| ANSI% Notifies DoorPch that the door will
require ANSI cursor positioning
codes, if ANSI% = 1. A value of 0
is the default.
| ANSI.COLOR% Notifies DoorPch that the door will
require ANSI color codes, if
ANSI.COLOR% = 1. A value of 0 is
the default.
| ANSI.MUSIC% Notifies DoorPch that the door will
require ANSI music codes, if
ANSI.MUSIC% = 1. A value of 0 is
the default.
ARG$ This string contains the data
returned by a CALL IN.PUT,
CALL GET.KEY or CALL GET.KEYECHO.
| AUTHOR.ADDRESS1$ If USE.DSS% = 1 and the door is
either a "SHAREWARE DEMO" or a
"LOCAL ONLY DEMO" then this is the
first line of the author's address
shown on the door's closing screen.
| AUTHOR.ADDRESS2$ If USE.DSS% = 1 and the door is
either a "SHAREWARE DEMO" or a
"LOCAL ONLY DEMO" then this is the
second line of the author's address
shown on the door's closing screen.
| AUTHOR.CITY.STATE$ If USE.DSS% = 1 and the door is
either a "SHAREWARE DEMO" or a
"LOCAL ONLY DEMO" then this is the
author's city and state shown on
the door's closing screen.
| AUTHOR.NAME$ If USE.DSS% = 1 and the door is
either a "SHAREWARE DEMO" or a
"LOCAL ONLY DEMO" then this is the
author's name shown on the door's
closing screen.
BAUDCONN$ Contains the baud rate at which the
caller connected to the BBS system.
(The variable is in STRING format.)
BAUDOPEN$ Contains the baud rate at which the
modem was opened by the door. This
may not contain the same value as
BAUDCONN$. (The variable is in
STRING format.)
Page 12
DoorPch - Version 3.7
User's Guide for DOOR Programs
| BBSSYS$ Name of the BBS software used by
the SysOp running the door program.
Example: PCBoard
| BBSSYS.FILE$ Name of the BBS software's door
interface file.
BELL% Notifies DoorPch to output a BELL
tone, if BELL% = 1. A value of 0
will NOT output a BELL (Default).
BGC% Background color
O for BLACK (Default)
1 for RED
2 for GREEN
3 for YELLOW
4 for BLUE
5 for MAGENTA
6 for CYAN
7 for WHITE
| BIRTH.DATE$ The birthdate of the caller (if
supported by the BBS software's
door interface file).
BLINK% When set to 1 all text displayed
will BLINK. Default is 0.
| BYTES.DOWNLOADED.THIS.CALL# The number of bytes downloaded from
the BBS this call (if supported by
the BBS software's door interface
file).
CALLALARM% A value of 1 indicates that F7 has
been toggled.
CENTER% Will center LN$ when it is OUT.PUT.
CENTER% = 1: LN$ = "Howdy": CALL
OUT.PUT
| CITY.STATE$ The city and state of the caller
(if supported by the BBS software's
door interface file).
| COM.PORT% The COM port used by the DOOR.
| CONFERENCE.EXITED.FROM$ The conference the caller was in
when exiting the BBS to the door
(if supported by the BBS software's
door interface file).
Page 13
DoorPch - Version 3.7
User's Guide for DOOR Programs
| CONFERENCE.MEMBER$ The conferences in which the caller
is a member (if supported by the
BBS software's door interface file).
| D.TIME# The number of seconds to delay
when using CALL DELAY.TIME.
DAY% See below variable TDATE$.
| DEFAULT.BBS.COLOR% The default color used by the BBS
(if supported by the BBS software's
door interface file).
DISPLAY% The LOCAL console display. A value
of 1 denotes "on". A value of 0
denotes "off".
DISPTIME$ Returned by CVTTIME or FORMATTIME.
Returns hours and minutes in the
format HH:MM.
DMIN% The number of MINUTES the caller
has remaining in the DOOR.
| DOOR.REGISTRATION.FEE$ If USE.DSS% = 1 and the door is
either a "SHAREWARE DEMO" or a
"LOCAL ONLY DEMO" then this is the
registration fee shown on the
door's closing screen.
| DOORPCH.SCORES% Notifies DoorPch the door program
will use DoorPch's single
player high score routine,
if DOORPCH.SCORES% = 1 or the
challenge ladder high score routine
if DOORPCH.SCORES% = 3.
| DOWNLOADS# The number of files the caller has
downloaded from the BBS (if
supported by the BBS software's
door interface file).
| ERROR.CORRECTING.CONNECTION% A value of 1 means a connection has
been established between two error
correcting modems. Default is 0.
(If supported by the BBS software's
door interface file.)
| EVENT.TIME$ The time of the BBS's event in
HH:MM format (if supported by the
BBS software's door interface file).
Page 14
DoorPch - Version 3.7
User's Guide for DOOR Programs
| EVENT.TIME# The time of the BBS's event in
seconds after midnight format (if
supported by the BBS software's
door interface file).
| EXPERT$ If EXPERT$ = "Y" then the caller is
in expert mode and if EXPERT$ = "N"
then the caller is in novice mode.
(If supported by the BBS software's
door interface file.)
| EXTRA% Notifies DoorPch how many of the
EXTRA variables that have been
stored in the scores file you will
also want displayed in the bulletin.
This value may range from 1 to 3.
| EXTRA1$ The value of the first EXTRA
variable stored in the scores file.
(The variable is in STRING format.)
| EXTRA1.NAME$ The name of the first EXTRA
variable which is shown in the
scores bulletin.
| EXTRA1.NUMERIC% If set to 1 then EXTRA1$ is
treated as a numeric variable.
| EXTRA2$ The value of the second EXTRA
variable stored in the scores file.
(The variable is in STRING format.)
| EXTRA2.NAME$ The name of the second EXTRA
variable which is shown in the
scores bulletin.
| EXTRA2.NUMERIC% If set to 1 then EXTRA2$ is
treated as a numeric variable.
| EXTRA3$ The value of the third EXTRA
variable stored in the scores file.
(The variable is in STRING format.)
| EXTRA3.NAME$ The name of the third EXTRA
variable which is shown in the
scores bulletin.
| EXTRA3.NUMERIC% If set to 1 then EXTRA3$ is
treated as a numeric variable.
Page 15
DoorPch - Version 3.7
User's Guide for DOOR Programs
FGC% Foreground color.
0 for BLACK (be careful)
1 for RED
2 for GREEN
3 for YELLOW (Default)
4 for BLUE
5 for MAGENTA
6 for CYAN
7 for WHITE
| FILES.DOWNLOADED.TODAY# The number of files the caller has
downloaded from the BBS today (if
supported by the BBS software's
door interface file).
FIRST$ The first name of the caller.
| GEN.DIR$ The path to the GEN directory (if
supported by the BBS software's
door interface file).
GRAPHICS% When equal to 1 the caller is in
GRAPHICS mode. When equal to 0 the
caller is NOT in GRAPHICS mode.
HIGH% Determines if text should be in
HIGH INTENSITY. Default is 1. For
LOW INTENSITY set this to 0.
| HOMEPHONE$ The home telephone number of the
caller (if supported by the BBS
software's door interface file).
HOURS% Returned by CALL GETTIME. The
current HOURS.
HSCR# Populate this variable with the 1st
player's high score when using
CALL HIGH.SCORE or CALL PUT.SCORE
or CALL SWAP.PLAYERS.
| J.AGE# The age of the caller, returned by
CALL MONTH.DAY.YEAR.TO.AGE. (If the
BBS software's door interface file
supports BIRTH.DATE$.)
| J.DAY% Populate this variable with
the day when using
CALL MONTH.DAY.YEAR.TO.AGE or
CALL MONTH.DAY.YEAR.TO.JULIAN.
| J.MONTH$ The name of the month returned when
using CALL MONTH.DAY.YEAR.TO.JULIAN.
Page 16
DoorPch - Version 3.7
User's Guide for DOOR Programs
| J.MONTH% Populate this variable with
the month when using
CALL MONTH.DAY.YEAR.TO.AGE or
CALL MONTH.DAY.YEAR.TO.JULIAN.
| J.WEEKDAY$ The name of the weekday
returned when using
CALL MONTH.DAY.YEAR.TO.JULIAN.
| J.WEEKDAY% The weekday returned when using
CALL MONTH.DAY.YEAR.TO.JULIAN.
| J.YEAR% Populate this variable with
the year when using
CALL MONTH.DAY.YEAR.TO.AGE or
CALL MONTH.DAY.YEAR.TO.JULIAN.
| JULIAN# The julian date returned when using
CALL MONTH.DAY.YEAR.TO.JULIAN.
LAST$ Last name of the caller, UPPER case.
| LAST.DATE.ON$ The last date the caller called the
BBS (if supported by the BBS
software's door interface file).
| LAST.DATE.PLAYED$ The last date the caller played the
door program.
| LAST.DIR.DATE$ The last date the caller searched
for new files (if supported by the
BBS software's door interface file).
LN$ Populate this string with your
output line. This data will be
displayed to the console and sent
to the COM port.
| LOCAL.MODE% If set to a 1, then the SysOp
entered the DOOR via the /LOCAL
parameter. Default is 0.
| LOCAL.MUSIC% If set to a 1, then the SysOp
will be able to hear music on the
local console.
LOCALUSR% If set to a 1, then the DOOR is
running in LOCAL mode. Default is 0.
| MAIN.DIR$ The path to the MAIN directory (if
supported by the BBS software's
door interface file).
Page 17
DoorPch - Version 3.7
User's Guide for DOOR Programs
| MAX.DAILY.FILES# The maximum files allowed for
download each day (if supported
by the BBS software's door
door interface file).
| MAX.DAILY.K# The maximum kilobytes allowed for
download each day (if supported
by the BBS software's door
door interface file).
MINUTES% Returned by when using CALL GETTIME.
The current MINUTES.
NAME$ The name of caller.
| NAME.CAPS$ The capitalized name of caller.
NETWORK% If found set to a 1 then the
DOORPCH.CFG indicates you are
running in a network. Use this
variable to determine when Network
logic (i.e. LOCK, UNLOCK, etc.)
should be used. IMPORTANT!!
| NO.DISPLAY.OFF% Notifies DoorPch that the door will
use commands such as SCREEN(##,##),
POS(0), or CSRLIN and requires
the DISPLAY to be kept on if
NO.DISPLAY.OFF% = 1. A value of 0
is the default.
NODE% Set this variable to 1 if you
require DoorPch to use LOCKing.
Default is 0, and will cause your
program to run on one node at a
time.
| NON.GRAPHICS.ANSI% If set to 1 the caller is able to
use ANSI cursor positioning codes
even though they called in
non graphics mode. Default is 0.
| ONCE% If set to 1 the scores file will
only allow each player to have
their name in it one time. Default
is 0, which allows the SysOp to
choose.
| PAGE.LENGTH% The page length of the caller (if
supported by the BBS software's
door interface file).
PAGEBELL% A value of 1 indicates F4 is
toggled ON.
Page 18
DoorPch - Version 3.7
User's Guide for DOOR Programs
PARAM$ Any parameters passed to your
program will be in this string. The
parameters must start with a "/".
| PASSWORD$ The password of the caller (if
supported by the BBS software's
door interface file).
| PCB.CALLER.FILE$ The path to and name of the PCBoard
CALLER# log (if used on a PCBoard
BBS).
| PCB.DAT.FILE$ The path to and name of the PCBoard
PCBoard.dat file (if used on a
PCBoard BBS).
| PCB.USERS.FILE$ The path to and name of the PCBoard
Users file (if used on a PCBoard
BBS).
| PLAYER2.NAME$ The name of the second player in
the door.
| PLAYER2.EXTRA1$ The value of the first EXTRA
variable stored in the scores file
for the second player in the door.
(The variable is in STRING format.)
| PLAYER2.EXTRA2$ The value of the second EXTRA
variable stored in the scores file
for the second player in the door.
(The variable is in STRING format.)
| PLAYER2.EXTRA3$ The value of the third EXTRA
variable stored in the scores file
for the second player in the door.
(The variable is in STRING format.)
| PLAYER2.HSCR# Populate this variable with the 2nd
player's high score when using
CALL HIGH.SCORE or CALL PUT.PLAYER2
or CALL SWAP.PLAYERS.
| PLAYER2.LAST.DATE.PLAYED$ The last date the second player
played the door program.
| PLAYER2.RUNG% The second player's position or
RUNG on the challenge ladder.
| POINTS.NAME$ The name for the value of the high
score as shown in the bulletin.
Default is "points".
Page 19
DoorPch - Version 3.7
User's Guide for DOOR Programs
| PRINT.USING$ Populate this variable with the
STRING expression containing format
specifiers when using
CALL PRINT.USING.
PROGB$ You MUST populate this variable
with the name of your DOOR program
BEFORE the INCLUDE for DOORPCH.BEG
but after the INCLUDE for
DOORPCH.USR.
Example: PROGB$ = "4CARD"
PROGNAME$ You populate this string with the
literal name of your DOOR program.
Example:
PROGNAME$ = "4 Card Solitare"
| PROTOCOL$ The transfer protocol used by the
caller (if supported by the BBS
software's door interface file).
R.ELEASE$ Same as above. The Release number
of your DOOR program.
Example: R.ELEASE$ = "v1.5"
| RC$ The string Return Code returned
when using DoorPch's Door Security
System.
Example: RC$ = "REGISTERED"
| RC% The numeric Return Code returned
when using DoorPch's Door Security
System.
Example: RC% = 1
| RECORD.NUMBER# The record number of the caller in
the BBS software's user database
(if supported by the BBS software's
door interface file).
RETURNCASE% If set to a 1 then ARG$ is returned
in UPPER case. If set to a -1 then
ARG$ is returned in LOWER case. If
set to a 0 then ARG$ is returned,
as keyed, unchanged.
| RUNG% The caller's position or RUNG on
the challenge ladder.
Page 20
DoorPch - Version 3.7
User's Guide for DOOR Programs
| SCORES.NAME$ The name for the value of the
scores as shown in the bulletin.
Default is "Scores".
SECONDS% Returned by CALL to GETTIME. The
current SECONDS.
| SECS.LEFT# The number of seconds the caller
has left in the door program.
| SECURITY.LEVEL% The security level of the caller
(if supported by the BBS software's
door interface file).
| SERIAL.NUM$ The serial number returned to you
when using DoorPch's Door Security
System.
Example: SERIAL.NUM$ = "00123"
SINCEMID# Returned by CALL to GETTIME. The
number of SECONDS since midnight.
| SORT% If set to 1 the scores file will
be sorted when using CALL PUT.SCORE
or CALL HIGH.SCORE. Default is 0
when using the challenge ladder.
| SPONSOR$ The name of the person who
sponsored or registered the door.
| SUBSCRIPTION.DATE$ The subscription or expiration date
of the caller (if supported by the
BBS software's door interface file).
| SYMBOL$ Populate this variable with the
SYMBOL of the type variable used in
LN$ when using CALL PRINT.USING.
Example:
SYMBOL$ = "$", "!", "%" or "#"
SYSFIRST$ The FIRST name of the SysOp from
the ".CFG" file. FIRST$ will be
populated with this name when
SYSOP% = 1.
SYSLAST$ The LAST name of the SysOp from the
".CFG" file. LAST$ will be
populated with this name when the
user record number is 1.
SYSNAME$ Populated with the name of YOUR
BBS. Extracted from ".CFG" record 2.
Page 21
DoorPch - Version 3.7
User's Guide for DOOR Programs
SYSOP% If set to 1, indicates the SysOp is
using the DOOR.
| SYSOP.COMMENT$ PCBoard's comment about the user
left by the SysOp.
TBSN% If set to a value greater than 1
then DoorPch will TAB to the
specified TAB position. Reset to 1
after CALL.
TDATE$ Populate this string with a valid
date (in this century). The day of
the year is returned in DAY%. See
GET.DAY SUB.
| TIME.CALLED$ The time the user called the BBS
(if supported by the BBS software's
door interface file).
| TIME.LAST.CALLED$ The time the user last called the
BBS (if supported by the BBS
software's door interface file).
TIME.ON# The elapsed time this call in the
DOOR in seconds.
TIMESTART# The time the caller entered the
DOOR in seconds.
| TIMES.ON# The number of times the user has
called the BBS (if supported by
the BBS software's door interface
file).
| TOTAL.DOORS.OPENED# The total number of doors the user
has opened on the BBS (if supported
by the BBS software's door
interface file).
| TOTAL.DOWNLOADED.K# The total number of kilobytes the
caller has downloaded from the BBS
(if supported by the BBS software's
door interface file).
| TOTAL.MSGS.LEFT# The total number of messages the
caller has left on the BBS (if
supported by the BBS software's
door interface file).
| TOTAL.MSGS.READ# The total number of messages the
caller has read on the BBS (if
supported by the BBS software's
door interface file).
Page 22
DoorPch - Version 3.7
User's Guide for DOOR Programs
| TOTAL.UPLOADED.K# The total number of kilobytes the
caller has uploaded to the BBS (if
supported by the BBS software's
door interface file).
| UPLOADS# The number of files the caller has
uploaded to the BBS (if supported
by the BBS software's door
interface file).
| USE.AT.CODES% Notifies DoorPch if the SysOp wants
DoorPch to support PCBoard v14.5's
"@X" color macros.
| USE.BASIC.COLORS% If set to 1 then DoorPch will use
the same coloring method as BASIC.
Example:
USE.BASIC.COLORS% = 1: FGC% = 15
is the same as FGC% = 7: HIGH% = 1
| USE.DSS% If set to 1 then the door will use
DoorPch's Door Security System.
See also RC$, RC%, and SERIAL.NUM$.
| USER.COMMENT$ A comment about the caller left by
the caller (if supported by the
BBS software's door interface file).
USR.KY$ The variable returned when using
CALL GET.INKEY and CALL GET.KEYLOOP.
USR.NODE$ The BBS node the user is calling.
| WORKPHONE$ The work telephone number of the
caller (if supported by the BBS
software's door interface file).
XPOS% Used to position the cursor. Use
only when doing LOCATE "type"
logic. XPOS% is the ROW number (1
to 23). Your value is set to a
NEGATIVE value once used. You may
use it to determine the last value
you had set.
YPOS% Same as XPOS% only for the COLUMN
position (1 to 79). Your value is
set to a NEGATIVE value once used.
You may use it to determine the
last value you had set.
Page 23
DoorPch - Version 3.7
User's Guide for DOOR Programs
DoorPch Macros
==============
The following macros may be used in files displayed when CALLing
READ.TXT(COLOR FILE,MONO FILE):
Macro Definition
----------------------- ----------------------------------
| @BEEP@ sends a CTRL-G (ascii BELL character) to the
caller but is not heard on the local machine
unless the Caller Alarm is turned on
| @BOARDNAME@ Name of the BBS you are on
| @BPS@ Connect Speed
| @BYTESLEFT@ Daily D/L Bytes Left
| @BYTELIMIT@ Daily D/L Byte Limit
| @BYTERATIO@ Download BYTE ratio
| @CITY@ City
| @CLS@ Clear the entire screen
| @CONFNUM@ Conference Number Only
| @DATAPHONE@ Business/Data Phone
| @DAYBYTES@ Daily D/L Bytes
| @DLBYTES@ Total D/L Bytes
| @DLFILES@ Total D/L Files
| @EVENT@ Event Time
| @EXPDATE@ Expiration Date
| @EXPDAYS@ Days until Exp. Date
| @FILERATIO@ Download FILE ratio
| @FIRST@ First Name (first letter capitalized)
| @FIRSTU@ First Name (all caps)
| @HANGUP@ Hangs the caller up
| @HOMEPHONE@ Home/Voice Phone
| @KBLEFT@ K bytes left (= @BYTESLEFT@ / 1024)
Page 24
DoorPch - Version 3.7
User's Guide for DOOR Programs
| @KBLIMIT@ K byte limit (= @BYTELIMIT@ / 1024)
| @LASTDATEON@ Last Date On
| @LASTTIMEON@ Last Time On
| @MSGLEFT@ Number of Messages Written
| @NODE@ Node Number
| @NUMTIMESON@ Number of Times On
| @PRODESC@ Default Protocol Description
| @SECURITY@ Security Level
| @SYSDATE@ Current Date
| @SYSTIME@ Current Time
| @TIMELEFT@ Time Left
| @UPBYTES@ Total U/L Bytes
| @UPFILES@ Total U/L Files
| @USER@ Full Name (all caps)
Structure of a DOOR Program
===========================
The following information provides a general overview of how you
construct a DOOR program. The process is very easy and you can
gain a lot of insight by reviewing the example DOOR that is
provided in the "ZIP" file. The basic format of a DOOR program is
as follows:
Start of Program -----------------------------
' $INCLUDE: 'DOORPCH.USR'
PROGNAME$ = "Example" ' These
PROGB$ = "EXAMPLE" ' four
R.ELEASE$ = "v1.0" ' MUST
NODE% = 1 ' be populated.
USE.DSS% = 1 ' These
ANSI% = 1 ' five
EXTRA% = 1 ' may
EXTRA1.NAME$ = "Mines" ' be
DOORPCH.SCORES% = 1 ' populated.
' $INCLUDE: 'DOORPCH.BEG' ' CALLs INITIALIZATION code in
' DORPCH37.EXE. If you had other
' information within. DOORNAME.CFn,
' you would continue reading the
' file here then immediately CLOSE #1.
Page 25
DoorPch - Version 3.7
User's Guide for DOOR Programs
.
. Your programs logic
.
' $INCLUDE: 'DOORPCH.END'
End of Program -------------------------------
Include File Usage
==================
The "DOORPCH.USR" include file establishes the required linkage
for all variables used in the DoorPch environment. These
variables are used by you (the DOOR programmer) to communicate
your needs to DoorPch.
The "DOORPCH.BEG" include file calls the initialization routines
used in DoorPch in order to read the configuration file,
initialize variables, ready the COM port, etc.
The "DOORPCH.END" include file provides a common set of error
routines and a set of conversion routines for accessing the
facilities of DoorPch by Basic line numbers. Note: Two choices
are available to you if you are upgrading from an earlier version
of DoorPch: A) Leave your existing DOOR program coded the way
you originally coded it (IE: GOSUB 10170, GOSUB 10200 etc), or
B) Convert your existing DOOR program to use CALL statements thus
eliminating the use of code in DOORPCH.END.
New doors should utilize CALLs to perform DoorPch functions.
Opening and Closing of Files
============================
File #1 is left OPEN for you. You may add records to
DOORNAME.CFn if you wish after the mandatory six records. Once
returned from the Initialization code (DOORPCH.BEG), you must
read YOUR records from File #1. Then be sure to CLOSE #1.
Whether or not you read data from the ".CFG" file or not you MUST
CLOSE #1.
File #2, #3 and #4 are reserved for use by DoorPch. These
files MUST NOT be used or a Doorpch fatal error most likely will
occur at some point in your programs execution. You may start at
File #5.
Page 26
DoorPch - Version 3.7
User's Guide for DOOR Programs
Starting a DOOR
===============
A run-time parameter is required to invoke your DOOR program.
Other parameters may also be passed so long as the first
parameter after the ".CFG" file name begins with a slash "/". If
a slash is found by DoorPch, the slash and all the data which
follows it are available in the variable: PARAM$ (see below under
VARIABLES).
Example:
4CARD 4CARD.CFG would invoke the program 4CARD.EXE passing
parameter 4CARD.CFG to the program. The contents of the
".CFG" file are:
C:\PCB\PCBOARD.SYS <=== The location of BBS interface file
The Pegasus BBS <=== Your BBS name goes here
Raymond <=== SysOps FIRST name
Clements <=== SysOps LAST name
Sondra Clements <=== DOOR Sponsor's name
Note: File #1 is left OPEN. You may add records to this file
if you need to pass additional information to your DOOR
program. Remember to CLOSE #1 so it will work properly with a
network.
Terminating a DOOR
==================
How to terminate the DOOR. Be certain all YOUR files (not those
used by Doorpch) are CLOSEed. Then simply do the following:
CALL EXITG
You will not be returned from this SUB routine. The DOOR will
terminate within DoorPch code.
Compiling Your DOOR Program
===========================
A BATch file is included (COMPILE.BAT). Execute this batch file
with your source module as a parameter.
Example: COMPILE 4CARD.BAS
When the batch file ends you will have an OBJect module present
in your current directory.
Page 27
DoorPch - Version 3.7
User's Guide for DOOR Programs
Linking Your DOOR Program
=========================
A BATch file is included (LINKER.BAT). Execute this batch file
with your OBJect module as a parameter.
Example: LINKER 4CARD.OBJ
When the batch file ends you will have an EXEcutable module
present in your current directory.
>> Be careful here: Giving the linker the name of
your SOURCE module will cause a LINK failure
and the SOURCE module will be DESTROYED. You
may wish to save your source prior to
executing this BATch file.
Executing Your DOOR Program
===========================
Your new .EXE module now contains all the necessary code to
function as a DOOR. The .EXE module requires the QuickBASIC
run-time routines from Microsoft (BRUN30.EXE) be present
somewhere in the PATH when you execute your DOOR program. You
must also have a DOS Environment variable set for Doorpch's
use. Place this statement in your AUTOEXEC.BAT file:
Example: SET DOORPCH=PCB (for compatibility with prior
versions of DoorPch)
Finally, since DORPCH37.EXE is a QuickBASIC 3.0 LIBRARY, you
should set an environment variable telling DOS where to find it.
Example: SET LIB=<path to DORPCH37.EXE>
A small example of a DOOR program is included in the DORPCH37.ZIP
file: EXAMPLE.BAS. You can look this program over for examples
of many of the Doorpch functions.
Programming Tips
================
ANSI Colors Graphics
====================
The following information outlines the use of various Doorpch
variables to control the foreground/background color,
highlighting, and blinking capabilities.
Page 28
DoorPch - Version 3.7
User's Guide for DOOR Programs
Intensity of Text
-----------------
In order for any text you wish to display to be in high intensity,
simply set the variable HIGH% = 1. Setting the same variable to
0 (zero) will display in low intensity.
Blinking Text
-------------
In order for any text you wish to display to be blinking,
simply set the variable BLINK% = 1. Setting the same variable to
0 (zero) will turn off the blinking attribute.
Foreground/Background Colors
----------------------------
To modify the colors that your text displays in, simply set the
two variables FGC% or BGC% to one of the values in the following
table for the desired effect:
1 for RED /
2 for GREEN /
* 3 for YELLOW /
4 for BLUE <== Corresponds to ANSI codes
5 for MAGENTA \
6 for CYAN \
7 for WHITE \
(*) - defaults
Printing Output
===============
Printing a Complete Line
------------------------
To write to the COM port a complete line of text:
Place your text in LN$ and CALL OUT.PUT
To center the text all you need to do is make
CENTER% = 1 then CALL OUT.PUT. The required
spaces will be added to center your text.
Page 29
DoorPch - Version 3.7
User's Guide for DOOR Programs
Printing a Partial Line
-----------------------
To write to the COM port a partial line of text holding
the cursor at the end of the printed text:
Place your text in LN$ and CALL OUT.NCR.
Example: To print a red "Hi" and a yellow " There"
FGC% = 1: LN$ = "Hi": CALL OUT.NCR
FGC% = 3: LN$ = " There": CALL OUT.PUT
Printing a Line & Get a Response
--------------------------------
Place your text in LN$ and CALL IN.PUT. Your response will be in
ARG$. Setting RETURNCASE% to 1 will result in the response being
returned in UPPER case. Setting this value to -1 (minus 1) will
return a response in LOWER case. Setting the value to 0 (zero)
will return the response as keyed without conversion. The
DEFAULT is RETURNCASE% = 1. If you set it to zero or minus one
(-1) it will be reset to 1 on the next CALL to IN.PUT.
Example:
RETURNCASE% = -1
LN$ = "Are you finished ? ": CALL IN.PUT
IF ARG$ = "y" then do something...
Printing with TABs
------------------
To print at a TAB position: Set TBSN% to your TAB value.
Example:
TBSN% = 50: LN$ = "Howdy": CALL OUT.PUT
The above would print beginning in column 50.
Ringing the BELL
================
Please do not WAKE UP the SYSOP! If your DOOR program needs to
ring the bell, please do it this way ! Set BELL% = 1. The bell
will not be sent to the console unless the door is running in
LOCAL mode.
Example: LN$ = "Ooops!": BELL% = 1: CALL OUT.PUT
Page 30
DoorPch - Version 3.7
User's Guide for DOOR Programs
Adding Color the Easy Way
=========================
With DoorPch Version 3.7 comes a new way to generate those fancy
color displays. A CALL to COLOR.CHK will colorize anything in
LN$. You must first set the foreground (FGC%) and the background
(BGC%). Then load LN$ with data, and make the CALL. Anything
contained between [,(,< and >,),] will be colorized.
The following rules apply for colorizing:
A. If CENTER% = 1 the text will be centered.
B. If BLINK% = 1 then all text inside of the delimiters
<>, [], or () will be blinking.
C. Numbers will be RED unless FGC% = 1 (red) then
numbers will be BLUE.
D. Uppercase characters will be CYAN unless FGC% = 6
(cyan) then they will be YELLOW.
E. Lowercase will be GREEN unless FGC% = 2 (green)
then lowercase will be MAGENTA.
The COLOR.CHK SUB will output characters but will NOT line feed.
You must CALL OUT.PUT to get a line feed.
Sending ANSI Music
==================
Place your ANSI music characters in MUSIC$ and CALL MUSICG. No
control codes or escapes sequences are put in MUSIC$, just raw
notes and QuickBASIC music codes. DoorPch will handle and load
the ANSI sequences needed to make your music work locally or
remotely. All notes will be converted to uppercase. Refer to
your QuickBASIC manual and use only the data that is contained
between the quotes. Doorpch will handle the PLAY and VARPTR$
commands.
Ask your users:
Can you handle music [Y/n]?
If yes, then populate MUSIC$ with your music and CALL MUSICG.
Note: Music will NOT be played to the local console if the
system is in a NETWORK and the DOOR is in LOCAL mode. Some
network servers cannot handle background music being played.
Page 31
DoorPch - Version 3.7
User's Guide for DOOR Programs
Example:
FGC% = 2: LN$ = "Can your system handle music [Y/n] ? "
CALL COLOR.CHK: CALL GET.KEYECHO
IF ARG$ = "Y" THEN
.
.your music logic
.
ELSE
.
.No music logic
.
END IF
Bell, Alarm or Local Music Toggles
==================================
If LOCAL.MUSIC% = 1 then F3 has been toggled ON.
If PAGEBELL% = 1 then F4 has been togged ON.
If CALLALARM% = 1 then F7 has been toggled ON.
Clearing the Screen
===================
Clear the local and callers screen and refresh LINES 24/25 of
the local console:
CALL CLR.SCRN
BASIC Keywords
==============
The following BASIC keywords should NEVER be used in a DOOR that
you write. Unpredictable results are certain if you do NOT
follow the rules outlined in this document.
Never use any of the following BASIC verbs:
LOCATE, PRINT, VIEW PRINT, PRINT USING, CLS, COLOR,
DRAW, END, INKEY$, KEY, ON COM, OPTION BASE, PAINT,
PEN, PLAY, POS(0), CSRLIN, RESUME, RUN, SCREEN,
SHELL, SOUND, STICK, STRIG, SYSTEM, WIDTH, WINDOW
There may be others . . .
High Scores & Bulletins
=======================
Load PROGB$ with your Door program's name excluding the(exe).
Put this before the INCLUDE of DOORPCH.BEG.
Page 32
DoorPch - Version 3.7
User's Guide for DOOR Programs
Example: PROGB$="4CARD"
Keep track of your high score in a variable: HSCR#.
Prior to doing the CALL EXITG or doing GOSUB 10410, CALL
HIGH.SCORE. All game information will be included in this file.
The location of an optional bulletin is also contained therein.
The SysOp must initialize the door (if DOORPCH.SCORES% <> 0) by
using the /CREATE command (ie. DP37Util 4CARD.SCR /CREATE)
The SysOp will be asked various questions to initialize the
high.score/bulletin generator. A text editor can be used to add a
bulletin name at a later time. The former is the preferred method.
SysOp Information
=================
Lines 24 & 25 of the Display
----------------------------
The information on this line is obtained from the BBS interface
file(s). Listed below is the information provided.
(*** Default Screen ***)
A. Node number (if in a network).
B. The baud rate of the caller.
C. Caller's name.
D. The name of the DOOR program and its release number.
E. The amount of free memory remaining.
F. The number of minutes the caller has used in the DOOR.
G. If the ALT-N or ALT-X keys have been toggled, then the
indicator will be displayed similarly to PCBoard.
H. The time the caller entered the DOOR.
I. The graphics mode of the caller.
J. The last date the caller called.
K. The security level of the caller and the conference the
caller exited from into the DOOR program.
L. The number of times the caller has called.
M. The number of files the caller has uploaded & downloaded.
N. The alarm toggle, page bell toggle and local music toggle.
O. The amount of free string space remaining.
P. The number of minutes the caller has left in the DOOR.
Q. The current time.
(*** ALT-H pressed one time ***)
A. The extended key meanings help screen.
(*** ALT-H pressed two times ***)
A. The caller's business & home telephone numbers.
B. The expiration date of the caller.
C. The password of the caller.
D. The user comment.
E. The SysOp comment.
Page 33
DoorPch - Version 3.7
User's Guide for DOOR Programs
(*** ALT-H pressed three times ***)
A. The number of total messages left by the caller.
B. The number of total files uploaded by the caller.
C. The number of total bytes uploaded by the caller.
D. The number of total messages read by the caller.
E. The number of total files downloaded by the caller.
F. The number of total bytes downloaded by the caller.
G. The number of total bytes downloaded today by the caller.
(*** ALT-H pressed four times ***)
A.-C. The same as the default screen.
D. The city & state of the caller.
E.-Q. The same as the default screen.
Extended Key Meanings
---------------------
The keys listed below will cause various values to be
displayed on lines 24 & 25 of the local console:
A. F1 key: Displays the version of DOORPCH compiled and linked
into the DOOR.
B. F2 key: Displays a caller's Alias if one is used via the DOOR.
C. F3 key: Toggles Local Music ON/OFF.
D. F4 key: Toggles the Bell ON/OFF. Value is returned to BBS when
DOOR completes.
E. F5 key: DOS Shell. Allows the SysOp to exit to DOS from inside
a DOOR.
F. F6 key: Toggles the Graphics mode of the caller.
G. F7 key: Toggle the alarm ON/OFF. Value is returned to BBS when
DOOR completes.
H. F8 key: Returns the caller involuntarily to the BBS.
I. F9 key: Toggles the display ON/OFF. Value is returned to BBS
when DOOR completes.
J. F10 key: Activates SysOp / Caller CHAT mode within the DOOR.
K. ESC key: Deactivates CHAT mode. DOOR is resumed.
L. ALT-H key: HELP key for lines 24 & 25 capabilities.
M. UP key: Allows the SysOp to add additional time for the caller.
Value is returned to BBS when DOOR completes.
N. DN key: Allows the SysOp to subtract time from the caller.
Value is returned to BBS when DOOR completes.
O. ALT-N key: Some BBSs use SysOp next on control/indicator.
Value is returned to BBS when DOOR completes.
P. ALT-X key: Some BBSs will exit after current caller completes their
session. Value is returned to BBS when DOOR completes.
Page 34
DoorPch - Version 3.7
User's Guide for DOOR Programs
DoorPch History
===============
Originally Clint Labarthe wrote the 1st version of Doorpch.
He saw a piece of code for RBBS DOORs and felt he could use it
as a foundation for PCBoard DOORs. This was the beginning of
DoorPch v1.0.
He quickly saw missing features and bugs and on to v1.1 and
so on until v2.6. Actually along the way he had a lot of help
from a lot of SysOps. Some were Beta Testers. Others gave him
inspiration while others actually provided code. At the moment,
two SysOps participated in the coding of Doorpch v3.5: Clint
Labarthe and Terry Shockley. Raymond Clements was very helpful
while the code was still in a QuickBASIC 3.0 source format.
Then, Ben Perron restructured the code for QuickBASIC 3.0 lib-
raries. Pat Carone was an early beta-tester. Who knows how much
these fine SysOps spent on long distance charges. You can bet is
was a bundle. Many thanks to them!!
Between v3.6 and v3.7 Raymond Clements took over sole ownership
of DoorPch.
Why a LIBRARY and NOT source code as in v2.6? That's a very good
question. SysOps simply made too many modifications. Some were
given to friends. And so it went. This code is not an attempt
to halt that type of creativity. Rather, it is to set the DOOR
standard. If you wish specific logic added that is not currently
in v3.7, please let us know. Incorporated in v3.7 are many, many
hours of work and the ideas of countless SysOps from around the
world. Its the best we could do at this point.
That is where we are today. It is a full functional, full feature
LIBRARY for you to LINK your DOOR program too. We don't ask much
in return. A form is provided for you to at least tell us who is
using it and provide a contribution of sorts. I can tell you
this: You won't get rich on DOORs. We will NOT get rich on you.
We all benefit from each other.
DoorPch Credits
===============
Thanks to Andy McPhee at Pacific Bell in California. He was
Clint's supervisor during his first coding assignments. He
once told Clint: "If you can think of it, you can code it!".
Well, to all of you SysOps and to you Andy, here it is! We did
just that!
Thanks to Ben Perron who created the first DoorPch library for
v3.1 using the DoorPch v2.6 source code as the basis for the
implementation. Without Ben's extra effort, DoorPch would not
be at the level it is at today.
Page 35
DoorPch - Version 3.7
User's Guide for DOOR Programs
Thanks to Dick Stout of Computer Technology who did much
alpha/beta testing. His system crashed so yours would not. All
of his reported errors were corrected. This lead to an almost
bug free crash proof environment.
Thanks to Mark Fletcher who was inspirational in the beginning
and thereafter provided code during the early going. He kept
the faith and used Doorpch from the beginning.
Thanks to Jerry Fields in Georgia for sacrificing his system
also. Many of the SysOps simply could not wait for the finished
product. Jerry was one of them. We sure appreciate his
enthusiasm.
Thanks also to Bud Napier in Massachusetts who kept the pressure
on and was willing to provide a beta site even with bugs in our
code.
A special thanks to Harold Thomson, a colleague of Clint at AT&T,
who wrote a myriad of assembler routines to assist us.
Thanks also to Terry Shockley and Charlie Wooster, AT&T SysOps
of the Deathstar BBS, for their assistance and constructive
reasoning during v3.5 development.
Thanks to Richard Driggers, SysOp of Sparta BBS in New Jersey for
his belief in us. His dedication to the betterment of BBS'ing
gave us cause to continue our work. He provided a rich test bed
also. Our hats goes off to him.
I'd like to thank Phil DeWitt, Curtis Kowalski, Thomas Pullens
and Andy Keeves, for contributing various routines which
were added during the coding of DoorPch v3.7. I'd also like to
thank David Terry and Fred Clark for all of their help!
I'd also like to thank all of the people whose suggestions I used
to help make this v3.7 the best version of DoorPch so far and all
of the SysOps who helped beta test DoorPch v3.7 and most of all I
would like to thank my wife, Sondra Clements, for putting up with
me while I was working on DoorPch v3.7.
Reporting Problems
==================
If you require assistance beyond the instructions contained
herein, please call one of our BBS's:
BBS Phone SysOp
----------------------------------------------------------------
The Pegasus BBS - node #1 (502)684-9855 Raymond Clements
The Pegasus BBS - node #2 (502)684-9871 HST Raymond Clements
Page 36
DoorPch - Version 3.7
User's Guide for DOOR Programs
User Enhancement Requests
=========================
If you find that a function is not present in Doorpch and you
feel this enhancement would benefit others, then please provide a
Change Request (CR) to us in the following format. We will
attempt to incorporate your request a subsequent release.
Change Request (CR):
Date:
Author:
Description of enhancement: <Pseudo code, structured English
narrative or actual BASIC code>
If you have a working model of the code and wish to share it with
us, then by all means provide it. You may submit your request in
two ways: 1) uploading to one of our BBS's as a PRIVATE upload
and leaving a [C]omment identifying the upload to the SysOp or
2) mailing your request to our address:
Raymond Clements
2204 Carriage Dr.
Owensboro, KY 42301-5823
Enjoy Doorpch v3.7!!
DoorPch Registration
====================
The DoorPch source/library code is distributed for your use on a
trial basis. If you decide to utilize it in a DOOR program,
you are asked to register your copy. We feel a registration
fee of $10.00 is reasonable. However, any amount from $10 to
$10,000,000 will be accepted. <grin>
We'd like to thank you for using DoorPch. We hope its as useful
to you as it has been for us. Any and all suggestions can be
mailed to the address below or directly conveyed to us on
The Pegasus BBS at (502)684-9855 or (502)684-9871 HST.
This code will work without alteration with QuickBASIC 3.0 com-
piled programs. If you have a request for improvements/enhance-
ments or detect a bug, please let us know. We will make every
effort to get the code changed thus helping all of us make better
DOORs.
When you register DoorPch your registration information will be
added into a database on The Pegasus BBS. You'll then be able to
call and create your own registered DOORPCH.SYS file by using the
DOOR SECURITY SYSTEM door in the SysOp (#1) conference. Place
that file in your "SET LIB=" directory and DoorPch will then say
it's registered to you.
Page 37
DoorPch - Version 3.7
User's Guide for DOOR Programs
TO: Raymond Clements Date___/___/___
DoorPch Registration
2204 Carriage Dr.
Owensboro, KY 42301-5823
**********************************************************
* *TYPE* THIS EXACTLY AS YOU WANT IT TO APPEAR ON THE *
* ENDING SCREEN OF DOORPCH v3.7 INCLUDING ANY AND ALL *
* UPPERCASE LETTERS, LOWERCASE LETTERS AND PUNCTUATION. *
**********************************************************
FROM: SysOp Name: ______________________________________________
BBS Name: ________________________________________________
Address: _________________________________________________
City: _______________________ State: _____ Zip: __________
Voice #: ( )______________ BBS #: ( )_______________
BBS Software & Version: ________________ BBS Hours: ______
Trademarks / Copyrights
=======================
DoorPch (C) is Copyrighted by Raymond Clements, 1987 - 1991
PCBoard (R) is a registered trademark of Clark Development Co. (CDC)
GAP Communications (C) is Copyrighted by GAP Development Co., 1987 - 1991
RBBS-PC (C) is Copyrighted by Thomas Mack, 1983 - 1991
Spitfire (C) is Copyrighted by Mike Woltz, 1987 - 1991
WILDCAT! (C) is Copyrighted by Mustang Software, 1987 - 1991
Microsoft (R) is a registered trademark of Microsoft Corp.
DOS (MS-DOS) (R) is a registered trademark of Microsoft Corp.
BRUN30.EXE (C) is Copyrighted by Microsoft Corp., 1987
Page 38